package com.paper.tiger.easy.rpc.s.server;

import com.paper.tiger.easy.rpc.TestInter;
import com.paper.tiger.easy.rpc.TestInvoke;
import com.paper.tiger.easy.rpc.s.client.client.RegisterService;
import com.paper.tiger.easy.rpc.core.RegisterServerMesage;

/**
 * [简要描述]:
 * [详细描述]:
 *
 * @author ZouHaiBo
 * @version 1.0, 2021/5/31 13:53
 * @since JDK 1.8
 */
public class Server
{

    public static void main(String[] args)
    {

        int port = 10086;
        // 连上注册中心，注册服务

        System.out.println("注册服务");
        RegisterServerMesage mesage = new RegisterServerMesage();
        mesage.setIp("127.0.0.1");
        mesage.setPort(port);
        mesage.setInterfaceClass(TestInter.class);
        mesage.setImplClass(TestInterImpl.class);
        RegisterService.registerService(mesage);
        RegisterService.startServer(port);


    }

}
